package net.libra.core
{
	import flash.events.Event;
	
	public class ModelEvent extends Event
	{
		static public const REMOVE:String = "remove";
		
		static public const UPDATE:String = "update";
		
		static public const UPDATE_FINISH:String = "updateFinish";
		
		public var key:Object;
		public var oldValue:Object;
		public var newValue:Object;
		public function ModelEvent(type:String, key:Object=null, oldValue:Object=null, newValue:Object=null, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			super(type, bubbles, cancelable);
			this.key = key;
			this.oldValue = oldValue;
			this.newValue = newValue;
		}
		
		override public function clone():Event
		{
			return new ModelEvent(type,key,oldValue,newValue,bubbles,cancelable);
		}
	}
}